﻿namespace BathroomLocator.Services
{
	using System.ServiceModel;
	using System.ServiceModel.Web;
	using BathroomLocator.Services.Models;

	[ServiceContract]
	public interface IAuthenticationService
	{
		[OperationContract]
		[WebInvoke(Method = "POST",
			UriTemplate = "/login",
			RequestFormat = WebMessageFormat.Xml,
			ResponseFormat = WebMessageFormat.Xml,
			BodyStyle = WebMessageBodyStyle.Bare)]
		string GenerateAuthToken(LoginModel login);

		[OperationContract]
		[WebInvoke(Method = "POST",
			UriTemplate = "/validate",
			RequestFormat = WebMessageFormat.Xml,
			ResponseFormat = WebMessageFormat.Xml,
			BodyStyle = WebMessageBodyStyle.Bare)]
		string ValidateAuthToken(string token);

		[OperationContract]
		[WebInvoke(Method = "POST",
			UriTemplate = "/register",
			RequestFormat = WebMessageFormat.Xml,
			ResponseFormat = WebMessageFormat.Xml,
			BodyStyle = WebMessageBodyStyle.Bare)]
		string CreateUser(CreateUserModel data);
	}
}